package cn.lg.soar.system.biz.modules.auth.entity;

import cn.lg.soar.database.base.entity.BaseEntity;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = false)
@Getter
@Setter
@Accessors(chain = true)
@Schema(description = "资源对象")
@TableName("lg_sys_permit")
public class
Permit extends BaseEntity {
    private static final long serialVersionUID = 3996425930427105931L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    @ColumnWidth(18)
    @ExcelProperty(value = "code", index = 0)
    private String code;

    @ColumnWidth(18)
    @ExcelProperty(value = "名称", index = 1)
    private String name;

    @ExcelProperty(value = "备注", index = 3)
    private String remark;

    @Version
    @Schema(description = "乐观锁")
    protected Integer version;

    @JsonIgnore
    @Override
    public Integer primaryKey() {
        return this.id;
    }

}
